export { CONTROL_TYPES, COMPONENT_TYPES } from '@/common/const-wb'

export const BASE_ASSETS_URL = process.env.NODE_ENV === "production" ?  "https://static.hd.xxx.com/jye/fe-web/" : "/"

export const SITE_DEFAULT_BG = 'https://static.hd.xxx.com/jye/fe-web/images/edit-bg.jpg'
export const DEFAULT_MEDIAS = {
  img: BASE_ASSETS_URL + 'images/default-img.png',
  video: BASE_ASSETS_URL + 'videos/default-video.mp4',
  icon: BASE_ASSETS_URL + 'images/default-icon.png',
  qrcode: BASE_ASSETS_URL + 'images/default-qrcode.png',
  mp3: BASE_ASSETS_URL + 'images/default-mp3.mp3',
}
export const CALENDER_TYPE = [
  { name: "当前月", value: 0 },
  { name: "选择日期", value: 1 },
]
export const CALENDER_TYPE_MAP = {
  currentMonth: 0,
  selectedDate: 1,
}
export const RADIO_CHECKBOX_SHAPE_TYPES = [
  { name:'圆形', value:"round" },
  { name:'方形', value:"square" },
]
export const TIMER_TYPES = [
  { name:'倒计时', value:1 },
  { name:'正计时', value:2 },
  { name:'活动同步计时', value:3 },
  { name:'倒计数', value:4 },
  { name:'活动开始结束对比', value:5 },
]
export const TIMER_TYPES_MAP = {
  countdownTime: 1,
  positiveTime: 2,
  activityCountdownTime: 3,
  countdown: 4,
  activityStartEndTime: 5,
}
export const BG_POSITION_REPEAT_TYPES_MAP = {
  centerTop: 1,
  contain: 5,
  width: 6,
  centerBottom: 2,
  repeatY: 3,
  whole:4,
}
export const BG_POSITION_REPEAT_TYPES = [
  { name:'宽高最大', value: BG_POSITION_REPEAT_TYPES_MAP.centerTop },
  { name:'宽高最小', value: BG_POSITION_REPEAT_TYPES_MAP.contain },
  { name:'宽度100%', value: BG_POSITION_REPEAT_TYPES_MAP.width },
  { name:'背景不拉伸置于页面底部', value: BG_POSITION_REPEAT_TYPES_MAP.centerBottom },
  { name:'纵向平铺', value: BG_POSITION_REPEAT_TYPES_MAP.repeatY },
  { name:'变形拉伸', value: BG_POSITION_REPEAT_TYPES_MAP.whole }
]
export const GLOBAL_POST_TYPES = [
  { name:'关注', value: 'isFollow' },
  { name:'发博带图', value: 'isPushImg' },
  { name:'发博', value: 'isPush' },
]
export const GLOBAL_POST_TYPES_MAP = {
  isFollow: 'isFollow',
  isPushImg: 'isPushImg',
  isPush: 'isPush'
}
//布类型:文字(0),选图(1),拍照(2),POI(3),长微博(4),话题(6),选视频(9)
export const OPEN_PUSH_TYPES = [
  { name:'文字', value:0 },
  { name:'选图', value:1 },
  { name:'拍照', value:2 },
  { name:'POI', value:3 },
  { name:'长微博', value:4 },
  { name:'话题', value:6 },
  { name:'选视频', value:9 },
]
export const EVENTS_RESULTS_TYPES = [
  { name:'页面属性', value:5 },
  { name:'弹层属性', value:1 },
  { name:'组件属性', value:2 },
  { name:'跳转链接', value:3 },
  { name:'不显示信息', value:4 },
]
export const EVENTS_RESULTS_TYPES_MAP = {
  page: 5,
  pop: 1,
  component: 2,
  jump: 3,
  noTips: 4,
}
export const GRIDIENT_DIRECTION = [
  { name:'上', value:'top' },
  { name:'下', value:'bottom' },
  { name:'左', value:'left' },
  { name:'右', value:'right' },
]
export const POSITION_TYPES = [
  { name: '自定义', value: 0 },
  { name: '置顶', value: 1 },
  { name: '置底', value: 2 },
  { name: '靠左', value: 3 },
  { name: '靠右', value: 4 },
  { name: '左上', value: 5 },
  { name: '右上', value: 6 },
  { name: '左下', value: 7 },
  { name: '右下', value: 8 },
  { name: '居中', value: 9 },
]
export const POSITION_TYPE = {
  no: 0,
  top: 1,
  bottom: 2,
  left: 3,
  right: 4,
  leftTop: 5,
  rightTop: 6,
  leftBottom: 7,
  rightBottom: 8,
  center: 9,
}
//slide的切换效果，默认为"slide"（位移切换），可设置为'slide'（普通切换、默认）,"fade"（淡入）"cube"（方块）"coverflow"（3d流）"flip"（3d翻转）。
export const SWIPER_EFFCE = [
  { name: '位移切换', value: 'slide' },
  { name: '淡入', value: 'fade' },
  { name: '方块', value: 'cube' },
  { name: '3d流', value: 'coverflow' },
  { name: '3d翻转', value: 'flip' },
]
export const SCROLLBER_TYPE = [
  { name: '黑色系', value: 'black' },
  { name: '白色系', value: 'white' },
  { name: '灰色系', value: 'lightgrey' },
  { name: '橄榄绿', value: 'olive' },
  { name: '巧克力色', value: 'chocolate' },
  { name: '珊瑚色', value: 'coral' },
  { name: '深红色', value: 'crimson' },
  { name: '西红柿色', value: 'tomato' },
  { name: '红色系', value: 'red' },
  { name: '橙色系', value: 'orange' },
  { name: '黄色系', value: 'yellow' },
  { name: '绿色系', value: 'green' },
  { name: '青色系', value: 'aqua' },
  { name: '蓝色系', value: 'blue' },
  { name: '紫色系', value: 'purple' },
  { name: '柠檬', value: 'lemon' },
  { name: '雾霾蓝', value: 'hazeblue' },
  { name: '山水棕', value: 'landscape' },
]
export const SCROLLBER_TYPE_MAP = {
  black: "black",
  white: "white",
  lightgrey: "lightgrey",
  olive: "olive",
  chocolate: "chocolate",
  coral: "coral",
  crimson: "crimson",
  tomato: "tomato",
  red: "red",
  orange: "orange",
  yellow: "yellow",
  green: "green",
  aqua: "aqua",
  blue: "blue",
  purple: "purple",
  lemon: "#fffacd",
  hazeblue: "#1d2b51",
  landscape: "#ababa0",
}
//https://www.w3.org/wiki/CSS/Properties/color/keywords 色值和英文单词对应关系
export const PLACEHOLDER_COLOR_TYPE = [
  { name: '深灰', value: 'darkgray' },
  { name: '浅灰色', value: 'gainsboro' },
  { name: '幽灵白', value: 'ghostwhite' },
  { name: '银色', value: 'silver' },
  { name: '烟白色', value: 'whitesmoke' },
  { name: '爱丽丝蓝', value: 'aliceblue' },
  { name: '紫色系', value: 'purple' },
]
export const PAGE_TIME_FUNCTION = [
  { name: '无', value: 0 },
  { name: '渐入', value: 1 },
]
export const ALIGN_TYPE = {
  top: 1,
  bottom: 2,
  left: 3,
  right: 4,
  horizontalCenterAlign: 5,
  horizontalCenterDistribute: 9,
  verticalCenterDistribute: 6,
  verticalCenterAlign: 8,
  singleCenter: 7,
}

export const ALIGN_HORIZONTAL_TYPE = [
  ALIGN_TYPE.top,
  ALIGN_TYPE.bottom,
  ALIGN_TYPE.horizontalCenterAlign,
  ALIGN_TYPE.horizontalCenterDistribute,
]
export const PAGINATION_TYPE = [
  { name: '无', value: 0 },
  { name: '分页器', value: 1 },
  { name: '分页器左右按钮', value: 2 },
  { name: '分页器按钮都可见', value: 3 },
]
export const PAGINATION_TYPE_MAP = {
  default: 0,
  dot: 1,
  btns: 2,
  dotAndBtns: 3,
}
export const PAGINATION_CUBE_TYPE = [
  { name: '分页器长条', value: 1 },
  { name: '分页器小圆点', value: 2 },
]
export const PROCESS_ITEM_TYPES = [
  { name: '横向进度条', value: 'wb-item-process'},
  { name: '垂直进度条', value: 'wb-item-process-vertical'},
]
export const BORDER_STYLES = [
  { name: "无", value:'none' },
  { name: "实线", value:'solid' },
  { name: "点状边框", value:'dotted' },
  { name: "虚线", value:'dashed' },
  { name: "双线", value:'double' },
  { name: "凹槽边框", value:'groove' },
  { name: "垄状边框", value:'ridge' },
  { name: "inset边框", value:'inset' },
  { name: "outset边框", value:'outset' },
]
export const GRADIENT_BG_TYPE = [
  { name: "无", value: 0 },
  { name: "渐变背景1", value: 1 },
]
export const IMG_FILL_TYPE = [
  { name: "无", value: '' },
  { name: "宽高最大", value: 'cover' },
  { name: "宽高最小", value: 'contain' },
  { name: "拉伸", value: 'fill' },
]
export const RADIO_CHECKBOX_TYPE = [
  {name: "按钮选中框", value:1},
  {name: "按钮", value:2},
  {name: "选中框", value:3},
]
export const RADIO_CHECKBOX_TYPE_MAP = {
  btnSelectedFrame: 1,//单选input按钮 自定义按钮
  btn: 2,//自定义按钮
  selectedFrame: 3,//单选input按钮
}
export const COLUMN_NUM = [
  {name: "自适应", value:0},
  {name: "1列", value:1},
  {name: "2列", value:2},
  {name: "3列", value:3},
  {name: "4列", value:4},
  {name: "5列", value:5},
  {name: "6列", value:6},
]
export const LINE_NUM = [
  {name: "0行", value:0},
  {name: "1行", value:1},
  {name: "2行", value:2},
  {name: "3行", value:3},
  {name: "4行", value:4},
  {name: "5行", value:5},
  {name: "6行", value:6},
  {name: "7行", value:7},
  {name: "8行", value:8},
  {name: "9行", value:9},
  {name: "10行", value:10},
]
export const COLUMN_PERCENT = {
  0: "auto",
  1: '100%',
  2: '50%',
  3: '33.33%',
  4: '25%',
  5: '20%',
  6: '16.6%',
}
export const MENU_WIDTH = {
  1: '100%',
  2: '49.8%',
  3: '33.2%',
  4: '24.8%',
  5: '19.9%',
  6: '16.6%',
}
export const NOTICE_BAR_MODE = [
  {name: "无", value:''},
  {name: "关闭按钮", value:'closeable'},
  {name: "链接箭头", value:'link'},
]
export const PREVIEW_MODE = {
  edit: "EDIT",
  preview: 'PREVIEW',
}



export const PAGE_TYPE = {
  single: 1,  // 多页单页
  long: 2,  // 多页长页
}
export const PAGE_TYPE_ = {
  page: 1,
  pop: 2,
}
// PIC=1;VEDIO=2;MUSIC=3;
export const MEDIAS = {
  image: {type: 1, uploadTxt: "上传图片", tips: "最大1M（.jpg / .png / .gif）"},
  video: {type: 2, uploadTxt: "上传视频", tips: "最大15M（.mp4）"},
  audio: {type: 3, uploadTxt: "上传音频", tips: "最大5M（.mp3）"},
}
export const DIGIT_MAP = ["一", "二", "三", "四", "五", "六", "七", "八", "九", "十", "十一", "十二", "十三", "十四", "十五","十六", "十七", "十八", "十九","二十",
"二十一","二十二","二十三","二十四","二十五","二十六","二十七","二十八","二十九","三十","三十一","三十二","三十三","三十四","三十五","三十六","三十七","三十八","三十九","四十"]

export const LOTTERY_TYPE_IMG = ['success-bg.png', 'form-bg.png', 'fail-bg.png']

export const PAGE_MODE_MAP = {
  top_down: 1,
  left_right: 2,
}
export const PAGE_MODE_TYPES = [
  {value: 1, name:"上下翻页"},
  {value: 2, name:"左右翻页"},
]
export const INPUT_TYPES = [
  {value: 'name', name: '姓名'},
  {value: 'phone', name: '手机'},
  {value: 'email', name: '邮箱'},
  {value: 'code', name: '验证码'},
  {value: 'other', name: '其他'},
  {value: 'weibo', name: '微博用户信息'},
  {value: 'fixed', name: '固定信息'},
]
export const INPUT_TYPES_MAP = {
  name: 'name',
  phone: 'phone',
  email: 'email',
  code: 'code',
  other: 'other',
  weibo: 'weibo',
  fixed: 'fixed',
}
export const INPUT_USER_TYPES = [
  {value: 'name', name: '姓名'},
  {value: 'level', name: '等级'},
]
export const INPUT_USER_TYPES_MAP = {
  name: 'name',
  level: 'level',
}
export const TIMER_PATTERN = [
  { value: 1, name: '时分秒' },
  { value: 2, name: '天时分秒' },
  { value: 3, name: '00:00:00' },
  { value: 4, name: '00s' },
]
export const TIMER_PATTERN_MAP = {
  hour: {value: 1, format: "HH 时 mm 分 ss 秒"},
  day: {value: 2, format: "DD 天 HH 时 mm 分 ss 秒"},
  hourTimeStr: {value: 3, format: "HH:mm:ss"},
  secondStr: {value: 4, format: "ss"},
}
export const POP_TYPES = {
  repost: 'pop-repost',
  success: 'pop-success',
  fail: 'pop-fail',
}
export const MOUSE_BEHAVIOR = [
  {value:"click", name:'点击'},
  {value:"load", name:'加载'},
  {value:"data", name:'数据'},
]
export const TEXT_STYLES = [
  {attr:'textAlign,left', icon:"jy-icon-left", checked:false, key:'textAlign'},
  {attr:'textAlign,center', icon:"jy-icon-centered", checked:false, key:'textAlign'},
  {attr:'textAlign,right', icon:"jy-icon-right", checked:false, key:'textAlign'},
];
export const TEXT_STYLES_ = [
  {attr:'fontWeight,bold', icon:"jy-icon-bold", checked:false, key:'fontWeight'},
  {attr:'fontStyle,italic', icon:"jy-icon-italic", checked:false, key:'fontStyle'},
  {attr:'textDecoration,underline', icon:"jy-icon-underline", checked:false, key:'textDecoration'},
  {attr:'', icon:"jy-icon-empty", checked:false},
];
